demos: Avoid shadowing a global from time.h
authorTimm Bäder <mail@baedert.org>
Fri, 5 Jun 2020 04:26:25 +0000 (06:26 +0200)
committerTimm Bäder <mail@baedert.org>
Fri, 5 Jun 2020 13:38:55 +0000 (15:38 +0200)
Sad but true.

demos/gtk-demo/listview_clocks.c
demos/gtk-demo/listview_weather.c

index 49108ac28096a23b4fce0d37db06fb50d7056c03..9b9a399aba21170082cd242795d0a7d7dfbafbea 100644 (file)
@@ -309,16 +309,16 @@ gtk_clock_init (GtkClock *self)
 
 static GtkClock *
 gtk_clock_new (const char *location,
-               GTimeZone  *timezone)
+               GTimeZone  *_timezone)
 {
   GtkClock *result;
 
   result = g_object_new (GTK_TYPE_CLOCK,
                          "location", location,
-                         "timezone", timezone,
+                         "timezone", _timezone,
                          NULL);
 
-  g_clear_pointer (&timezone, g_time_zone_unref);
+  g_clear_pointer (&_timezone, g_time_zone_unref);
 
   return result;
 }
index 6d8221b36a6e54563349bbbca42fdbe70012a474..ed1ad24dfb00aeb3654fc41f0baa41fbf7c6d7c9 100644 (file)
@@ -78,13 +78,13 @@ gtk_weather_info_new (GDateTime      *timestamp,
 
 static GDateTime *
 parse_timestamp (const char *string,
-                 GTimeZone  *timezone)
+                 GTimeZone  *_timezone)
 {
   char *with_seconds;
   GDateTime *result;
 
   with_seconds = g_strconcat (string, ":00", NULL);
-  result = g_date_time_new_from_iso8601 (with_seconds, timezone);
+  result = g_date_time_new_from_iso8601 (with_seconds, _timezone);
   g_free (with_seconds);
 
   return result;